<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>Hello</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" href="../../css/jqweui/lib/weui.min.css">
    <link rel="stylesheet" href="../../css/jqweui/css/jquery-weui.css">
    <link rel="stylesheet" href="../../css/jqweui/css/jqweui_extend.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_539359_q9xrtmlc8gp.css">
    <script src="../../script/plugins/jquery.min.js"></script>
    <script type="text/javascript" src="../../script/plugins/in/in-min.js"></script>
    <script type="text/javascript" src="../../css/jqweui/js/in-config.js"></script>
    <script src="../../css/jqweui/js/jquery-weui.js"></script>
    <script src="../../css/jqweui/js/util.js"></script>
    <style>
        .sp_result_area{position:fixed!important;width:100%!important;padding-bottom:40px!important;}
        .sp_result_area .sp_pagination{position:absolute;width:100%;height:40px!important;bottom:0;background:#f1f1f1;border-top:1px solid #e8e8e8;}
        .sp_result_area .sp_pagination ul{display:flex!important;justify-content:space-between}
        .sp_results > li{line-height:35px!important;}
        .sp_results{max-height:140px;overflow-y:auto;}
        div.sp_result_area div.sp_pagination li.csFirstPage,
        div.sp_result_area div.sp_pagination li.csPreviousPage,
        div.sp_result_area div.sp_pagination li.csNextPage,
        div.sp_result_area div.sp_pagination li.csLastPage{
            width:40px;height:40px;line-height:40px;flex-shrink:0;flex-grow:0;
        }
        div.sp_result_area div.sp_pagination li.pageInfoBox{flex-shrink:1;flex-grow:1;}
        div.sp_result_area div.sp_pagination>ul>li>a{display:block;width:100%!important;height:40px!important;line-height:40px!important;}
    </style>
</head>
<body class="wrap">
<div id="test"></div>
<div class="form-group">
    <label class="col-sm-2 control-label">选择商品</label>
    <div class="col-sm-3">
        <input type="text" class="form-control" id="selectPage" placeholder="请选择商品" >
        <script> In('selectpage',function(){
            var dom=$('#selectPage');
            dom.selectPage({
                keyField:'goods_id',
                showField:'goods_name',
                multiple:true,
                pagination:true,
                //dbTable:'f_seller',
                data:'https://www.easy-mock.com/mock/5b4db592461ecb1842d1dc99/les/goodslist',
                andOr:'OR',
                params : function(){return {'searchField':'goods_name'}},
                eAjaxSuccess : function(data){
                    console.log(data);
                    if(data.totalRow>0){
                        return data;
                    }else{
                        return false;
                    }
                },
                formatItem : function(data){
                    return data['goods_name'];
                }
            });
        })
        </script>
    </div>
</div>
<script>
    localStorage.setItem('test','12343');
    var test =localStorage.getItem('test');
    $('#test').text(test);
</script>
</body>
</html>